/**
 * MovieInfo class
 *
 * A MovieInfo is an object which contains all relevant info needed to display
 * a MovieElement. Movie data are contained in JSON objects returned from tMDb.
 *
 * Must contain a URL to the poster, the movie ID, title, and the User's interest level.
 *
 * @author Jim Carroll
 * @version 1.0
 *
 * Last modified: 2012.12.3
 */
 
function MovieInfo( movieJSON ) {
	var id = movieJSON.id;
	var poster_url = 'http://cf2.imgobject.com/t/p/w92'+movieJSON.poster_path;
	var title = movieJSON.title;
	var interest = User.read().interests[movieJSON.id];

	/* getters */

	this.__defineGetter__("id", function() {
		return id;
	});

	this.__defineGetter__("poster_url", function() {
		return poster_url;
	});

	this.__defineGetter__("title", function() {
		return title;
	});

	this.__defineGetter__("interest", function() {
		return interest;
	});
}